package com.zxh.blog.service.impl;

import com.zxh.blog.dao.TypeDao;
import com.zxh.blog.domain.Type;
import com.zxh.blog.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {
	@Autowired
	TypeDao typeDao;

	public List<Type> selectByList() {
		List<Type> list = typeDao.selectByList();
		return list;
	}

	public void batchDelete(int[] ids) {
		typeDao.batchDelete(ids);
	}

	public void updateType(Type type) {
		typeDao.update(type);
	}

	public Integer addType(Type type) {
		Integer save = typeDao.save(type);
		return save;
	}
}
